<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
        .radio-inline input[type=radio] {
            margin-top: 4px
        }
    </style>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
<!-- 标题 -->
<div class="page-heade">
    <h2 class="title_color text-center">添加进场申请明细</h2>
</div>
<!-- 标题 -->
<div class="row-margin-top">
    <form action="" class="form-inline" id="form1">
        <table class="table-bordered table t_table">
            <tr>
                <td style="min-width: 180px;width: 180px" class="text-right">
                    <label for="">网点<span class="colorRed">*</span>：</label>
                </td>
                <td colspan="3">
                    <div class="col-xs-4">
                        <div class="input-group" id="" >
                            <input type="text" placeholder="请输入关键字或空格查询" class="form-control inputremindPeple" id="net" value="">
                            <div class="input-group-btn">
                                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-4">
                        <button class="btn btn-primary" id="select_net">选择</button>
                        <button class="btn btn-primary clear_net" id="clear_net">清空</button>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">您选定的网点是：</label></td>
                <td class="text-left" colspan="3" id="netTwo">
                    <div class="duoxuan" id="selected_net">
                        {if isset($list)}
                        <span class="ren" data-id="{$list.net_id}">{$list.net_title}<span class="close">×</span><input type="hidden" name="selected_net" value="{$list.net_id}"></span>
                        {/if}
                    </div>
                </td>
                <td class="text-left" id="saveFormalFz"></td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">已进场条码</label></td>
                <td class="text-left" colspan="3" id="yiJinChangTiaoMa">
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for=""></label></td>
                <td class="text-left" colspan="3">温馨提示：已进场条码包括:1、任何时间段进场并且未退场的条码。2、单店销量指的是该网点上月的销量，如果新店进场则填写新店进场。</td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">本次进场条码<span class="colorRed">*</span>：</label>
                </td>
                <td colspan="3">
                    <div style="display: inline-block;position:relative;">
                        <input type="text" placeholder="请输入关键字或空格查询" class="form-control inputremindPeple" id="benCiJinChangTiaoMa" value="">
                        <div class="cg_suggest" style="display: none;">

                        </div>
                    </div>
                    <button class="btn btn-primary" type="button" id="select_benCiJinChangTiaoMa">选择</button>
                    <button class="btn btn-primary clear_net" type="button" id="clear_benCiJinChangTiaoMa">清空</button>
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">您选定的本次进场产品是：</label></td>
                <td class="text-left" colspan="3">
                    <div class="duoxuan" id="selected_benCiJinChangTiaoMa">
                        {if isset($list)}
                        <span class="ren" data-id="{$list.tm_id}">{$list.tm_title}<span class="close">×</span><input type="hidden" name="selected_tiaoma[]" value="{$list.tm_id}"></span>
                        {/if}
                    </div>
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">进场月份<span
                        class="colorRed">*</span>：</label></td>
                <td class="text-left">
                    <select name="year" id="year" class="form-control">
                        <option value="">请选择</option>
                        {volist name="years" id="row"}
                        <option value="{$row}" {if $row==$list.year}selected{/if}>{$row}</option>
                        {/volist}
                    </select>年
                    <select name="month" id="month" class="form-control">
                        <option value="">请选择</option>
                        <option value="1" {if 1==$list.month}selected{/if}>1</option>
                        <option value="2" {if 2==$list.month}selected{/if}>2</option>
                        <option value="3" {if 3==$list.month}selected{/if}>3</option>
                        <option value="4" {if 4==$list.month}selected{/if}>4</option>
                        <option value="5" {if 5==$list.month}selected{/if}>5</option>
                        <option value="6" {if 6==$list.month}selected{/if}>6</option>
                        <option value="7" {if 7==$list.month}selected{/if}>7</option>
                        <option value="8" {if 8==$list.month}selected{/if}>8</option>
                        <option value="9" {if 9==$list.month}selected{/if}>9</option>
                        <option value="10" {if 10==$list.month}selected{/if}>10</option>
                        <option value="11" {if 11==$list.month}selected{/if}>11</option>
                        <option value="12" {if 12==$list.month}selected{/if}>12</option>
                    </select>月
                </td>
                <td style="min-width: 200px;width: 200px" class="text-right">
                    <label for="">负责人<span class="colorRed">*</span>：</label>
                </td>
                <td>
                    <input type="text" class="form-control" style="min-width: 220px;" name="head" value="{$list.head}" id="head">
                    <input type="hidden" name="head_id" value="{$list.head_id}" >
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">预计核销时间<span class="colorRed">*</span>：</label>
                </td>
                <td><input type="text" class="form-control layer-date" name="expCanTime" value="{:date('Y-m-d',$list.expCanTime)}" id="expCanTime"></td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">费用支付方式<span class="colorRed">*</span>：</label>
                </td>
                <td>
                    <select name="paymethod" id="paymethod" class="form-control">
                        <option value="">请选择</option>
                        {volist name="fipay" id="row"}
                        <option value="{$row.id}" {if $list.paymethod==$row.id}selected{/if}>{$row.title}</option>
                        {/volist}
                    </select>
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">三级费用科目<span class="colorRed">*</span>：</label>
                </td>
                <td>
                    <select name="feetype" id="feetype" class="form-control">
                        {volist name="feetype" id="row"}
                        <option value="{$row.id}" {if $row.id==$list.feetype}selected{/if}>{$row.title}</option>
                        {/volist}
                    </select>
                </td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">未税总额(元)<span
                        class="colorRed">*</span><span class="helpText">帮</span></label></td>
                <td><input type="text" class="form-control" name="amount" value="{$list.amount}" id="amount"></td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">是否增值税(可抵扣)<span
                        class="colorRed">*</span>：</label></td>
                <td>
                    <div class="form-group">
                        <label class="radio-inline">
                            <input type="radio" name="isVAT" id="is_ok" value="1" {if $list.isVAT==1}checked{/if}>是
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="isVAT" id="is_no" value="0" {if $list.isVAT==0}checked{/if}>否
                        </label>

                    </div>
                </td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">税率<span
                        class="colorRed">*</span></label></td>
                <td><input type="text" class="form-control" name="shuilv" value="{$list.shuilv}" style="width: 50px;" id="shuilv">%</td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">含税总额(元)<span
                        class="colorRed">*</span></label></td>
                <td><input type="text" class="form-control" name="hanshui" value="{$list.hanshui}" id="hanshui" readonly></td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">实际投入总额(元)<span
                        class="colorRed">*</span></label></td>
                <td><input type="text" class="form-control" name="fb_shijitourufeiyong" value="{$list.fb_shijitourufeiyong}" id="fb_shijitourufeiyong" readonly></td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">费用计入部门<span class="colorRed">*</span></label>
                </td>
                <td>
                    <div style="display: inline-block;position:relative;">
                        <input type="text" class="form-control" name="jrbm" value="{$list.jrbm}" id="jrbm" style="display: none;">
                        <div id="jrbm_queding" class="selectedOnlyOne" >
                            <span class="inin">{$list.jrbm_title}</span>
                            <span class="close">×</span>
                        </div>
                        <div class="cg_suggest" style="display: none;">

                        </div>
                    </div>
                    <a href="javascript:;" class="btn btn-primary" id="select_fyjrbm">选择</a>
                </td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">费用计入方案</label></td>
                <td>
                    <select name="project" id="" class="form-control">
                        <option value="">请选择</option>
                        {volist name="fijiru" id="row"}
                        <option value="{$row.id}" {if $list.project==$row.id}selected{/if}>{$row.title}</option>
                        {/volist}
                    </select>
                </td>
            </tr>
        </table>

        <table class="table-bordered table t_table" style="margin:1px" id="table1">
            <tr class="info">
                <th class="text-center">产品名称</th>
                <th class="text-center">标准出产价</th>
                <th class="text-center">经销商原价<span class="colorRed">*</span></th>
                <th class="text-center">零售商供货价<span class="colorRed">*</span></th>
                <th class="text-center">公司建议售价<span class="colorRed">*</span></th>
            </tr>
            <tbody class="prd">
            <tr class="infoContent" data-id="{$list.f1}">
                <td><span class="productText">{$list.f1_title}</span><a class="J_menuItem" title="{$list.f1_title}" href='{:url("TiApply/prodetail",["pid"=>$list.f1])}'><span class="glyphicon glyphicon-eye-open eyes" aria-hidden="true" title="产品详情"></span></a><input type="hidden" name="f1[]" value="{$list.f1}"><input type="hidden" name="f1_title[]" value="{$list.f1_title}"></td>
                <td><span class="ObjectNum">{$list.f2}</span>元/盒<input type="hidden" name="f2[]"></td>
                <td><input type="text" class="textEff" style="width: 80px" readonly value="{$list.f3}" name="f3[]">元/盒</td>
                <td><input type="text" class="form-control" style="width: 80px" value="{$list.f4}" name="f4[]">元/盒</td>
                <td><input type="text" class="form-control" style="width: 80px" value="{$list.f5}" name="f5[]">元/盒</td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <td class="text-right" row="2" style="width: 280px;">备注</td>
                <td colspan="4">
                    <textarea name="brief" id="" rows="2" class="form-control" style="width: 50%">{$list.brief}</textarea><span
                        style="vertical-align: bottom;">(200)</span>
                </td>
            </tr>
            </tfoot>

        </table>
        <div class="row sub_btn white-bg" style="width:100%;text-align:center;padding: 20px 0">
            <input type="button" class="btn btn-success" value="保存并并返回" id="saveBack">
            <input type="button" class="btn btn-warning" value="返回" onclick="parent.layer.close(parent.layer.getFrameIndex(window.name))">
        </div>

    </form>
</div>
<!-- 全局js -->
{include file="Public/footer"}
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>

<script>
    var link1 = "{:url('select/netjson2',['jxs_id'=>$jxs_id])}"
    var link2 = '{:url("benCiJinChangTiaoMa")}'
    var link3 = '{:url("fyjrbm")}'
    var link4 = '{:url("TiApply/prodetail")}'
    var link5 = '{:url("tinetgroup/saveAsCommonNetGroup")}'
    var link6 = '{:url("selectMyNetGroup")}'
    var link7 = '{:url("selectNetDX")}'
    var link8 = '{:url("dxbcjctm")}'
    var net_id = '{$list.net_id}'
    var jxs_id = '{$jxs_id}'
    var ti_id = '{$list.ti_id}'
    var mxid = '{:request()->param("id")}'
</script>
<script src="__STATIC__/layout/js/tijinchang/updateData.js"></script>
</body>
</html>
